﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAO
{
    public class BaseDao
    {
        protected agiltasticDBEntities _agiltasticDbEntities;

        public BaseDao()
        {
            _agiltasticDbEntities = new agiltasticDBEntities();
        }

        public List<Category> GetAllCategory()
        {
            var query = from c in _agiltasticDbEntities.Category
                        orderby c.Name
                        select c;
            return query.ToList();
        }

        public List<Degree> GetAllDegree()
        {
            var query = from c in _agiltasticDbEntities.Degree
                        orderby c.Name
                        select c;
            return query.ToList();
        }
    }
}
